﻿@model E5_KhuyenMaiVang.Models.DEAL

@{
    ViewBag.Title = "AddDeal";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
   
@using (Html.BeginForm())
{    
    <div id="random_deal">
        <div class="title-content">ĐĂNG THÔNG TIN KHUYẾN MÃI</div>
        <div class="validation">@Html.ValidationSummary(true)</div>        
        <!-- Thông tin sản phẩm -->
        <div class="register">
            <h2>THÔNG TIN SẢN PHẨM</h2>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.DealName)</div>
                    <div class="input-row">
                  	    @Html.EditorFor(model => model.DealName)
                        @Html.ValidationMessageFor(model => model.DealName)
               	    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.Price)</div>
                    <div class="input-row">
                  	    @Html.EditorFor(model => model.Price)
                        @Html.ValidationMessageFor(model => model.Price)
               	    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.Discount)</div>
                    <div class="input-row">
                  	    @Html.EditorFor(model => model.Discount)
                        @Html.ValidationMessageFor(model => model.Discount)
               	    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.StartDate)</div>   
                    <div class="input-row">       
                        @Html.EditorFor(model => model.StartDate, new { id = "StartDate" })                        
                        @Html.ValidationMessageFor(model => model.StartDate)
               	    </div>
			    </div>            
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.EndDate)</div>   
                    <div class="input-row">  
                        @Html.EditorFor(model => model.EndDate, new { id = "EndDate" })
                        @Html.ValidationMessageFor(model => model.EndDate)                          
               	    </div>
			    </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.ValidDate)</div>   
                    <div class="input-row">        
                        @Html.EditorFor(model => model.ValidDate, new { id = "ValidDate" })
                        @Html.ValidationMessageFor(model => model.ValidDate)
               	    </div>
			    </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.InvalidDate)</div>   
                    <div class="input-row">        
                        @Html.EditorFor(model => model.InvalidDate, new { id = "InvalidDate" })
                        @Html.ValidationMessageFor(model => model.InvalidDate)
               	    </div>
			    </div>

                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.Description)</div>
                    <div class="input-row">
                        @Html.TextAreaFor(model => model.Description, new { id = "textarea", cols = "45", rows = "5" })
                        @Html.ValidationMessageFor(model => model.Description)                  	    
               	    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.Image)</div>
                    <div class="input-row">
                  	    @Html.EditorFor(model => model.Image)
                        @Html.ValidationMessageFor(model => model.Image)
               	    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.Spec)</div>
                    <div class="input-row">
                        @Html.TextAreaFor(model => model.Spec, new { id = "textarea", cols = "45", rows = "5" })
                        @Html.ValidationMessageFor(model => model.Spec)                  	    
               	    </div>
                </div>
                <!--Hết thông tin sản phẩm-->
                <div class="register">
                <h2>THÔNG TIN KHUYẾN MÃI</h2>
                
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.MaxQuantity)</div>
                    <div class="input-row">
                  	    @Html.EditorFor(model => model.MaxQuantity)
                        @Html.ValidationMessageFor(model => model.MaxQuantity)
               	    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.MinQuantity)</div>
                    <div class="input-row">
                  	    @Html.EditorFor(model => model.MinQuantity)
                        @Html.ValidationMessageFor(model => model.MinQuantity)
               	    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.CategoryID)</div>
                    <div class="input-row">      	    
                        @Html.DropDownList("CategoryID", String.Empty)
                        @Html.ValidationMessageFor(model => model.CategoryID)
                    </div>
                </div>
                <div class="row">
                    <div class="left-row">@Html.LabelFor(model => model.CityID)</div>
           		    <div class="input-row">
                  	    @Html.DropDownList("CityID", String.Empty)
                        @Html.ValidationMessageFor(model => model.CityID)
               	    </div>
                </div>
                </div>
                <!--Hết thông tin khuyến mãi-->
                <div class="row">
                <div class="midle">
                    <input class="submit-form" name="submit" value=" Thêm Deal " type="submit" /></div>
                <div class="midle">
                    <input class="submit-form" name="reset" value=" Xóa Bỏ " type="reset" /></div>
            </div>            
        </div>	       
    </div>   
    <script>
        $(function () {
            $("#StartDate").datepicker();
        });
    </script>
    <script>
        $(function () {
            $("#EndDate").datepicker();
        });
    </script>
    <script>
        $(function () {
            $("#ValidDate").datepicker();
        });
    </script>
    <script>
        $(function () {
            $("#InvalidDate").datepicker();
        });
    </script>    
}
<table width="100%">
</table>